/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.iddaa.core.dao;

import java.io.Serializable;
import java.util.Collection;

/**
 *
 * @author aziz
 */
public interface GenericDAO<T, ID extends Serializable> {

    T getById(ID id, boolean lock);

    T getById(ID id);

    T loadById(ID id);

    Collection<T> loadAll();

    ID save(T entity);

    void update(T entity);

    void saveOrUpdate(T entity);

    void saveOrUpdateAll(Collection<T> entityCollection);

    void delete(T entity);

    void deleteById(ID id);

    void deleteAll(Collection<T> entityCollection);

    T merge(T entity);
    
	void initialize(Object object);

	void refresh(T entity);
	
}
